<#include "/common/header.html" />
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox">
                    <div class="ibox-title">
                        <h5>角色列表</h5>
                        <div class="ibox-tools">
                            <a href="toadd" class="btn btn-primary btn-xs">添加角色</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                         <table class="table table-hover">
                          	<#list roleList as role>
                          		<tr>
                          			<td>${role.roleCode}</td>
                          			<td>${role.roleName}</td>
                          			<td>
                          				<a href="/role/getauth?id=${role.id}" class="btn btn-success auth">分配权限</a>
                          			</td>
                          		</tr>
                          	</#list>   
                          </table>
                         </div>
                    </div>
                </div>
            </div>
        </div>
  <#include "/common/footer.html" />  
  <script type="text/javascript">
  	$(function(){
  		$(".auth").click(function(){
  			var that = $(this);
  			parent.layer.open({
  			    type: 2,
  			    title: '分批权限',
  			    closeBtn:1,
  			    shadeClose: false,
  			    shade: 0.8,
  			    area: ['90%', '90%'],
  			    content: that.attr("href") //iframe的url
  			});
  			return false;
  		})	
  	})
  	
  </script>
</body>
</html>